Fix/brain repo corrections#67
Open
dbadaniel wants to merge 28 commits intoEvolutionAPI:developfrom
Open
Conversation
… skills Move Telegram reply() out of skill SKILL.md files into the routine .py callers via notify_telegram=True on run_skill(). This guarantees exactly one send per execution — the instruction is appended at the end of the prompt after all skill steps, so the agent cannot send it early. - runner.py: add notify_telegram param to run_skill() — reads chat_id from TELEGRAM_CHAT_ID env, appends explicit one-shot instruction - Skills cleaned: prod-end-of-day, prod-good-morning, pulse-faq-sync, pulse-daily (custom files gitignored, updated locally) - Routines updated: end_of_day, good_morning (custom routines gitignored) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Telegram notification was still in the skill file, causing the agent to call reply() multiple times per run (3x observed on 25/04 at 06:51). Notification now controlled by notify_telegram=True in review_todoist.py (gitignored custom routine, already updated on disk). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… cwd
Ticket threads pass workspace_path (e.g. workspace/personal/) as the
session cwd. loadAgentFile was building the path relative to that cwd,
so it looked for .claude/agents/ inside the ticket's folder instead of
the workspace root — always failing for every agent.
Fix: try WORKSPACE_ROOT/.claude/agents/{name}.md first, fall back to
cwd for custom per-directory agents.
Affected: kai-personal-assistant, flux-finance, and any ticket with
a workspace_path set.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…template Root cause: notify_telegram instruction showed reply(chat_id=..., text="...") as an inline code snippet, causing the agent to execute it immediately on reading the instruction AND again at the end — 2x per instruction. Financial Pulse was getting 4x because the skill's Step 8 also contained a reply() call instruction (2 instructions × 2 executions = 4 messages). Fixes: - runner.py: rewrite notify_telegram prompt to describe the action in plain text without an inline function-call template - fin-daily-pulse SKILL.md: remove Step 8 Telegram section — notification is handled by the routine caller via notify_telegram=True Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comprehensive sweep of all 175+ skills. Root cause of all duplicate Telegram notifications: skills contained inline reply(chat_id=...) code examples that Claude executed immediately on reading, then called again at the actual end-of-skill step — causing 2x (or 4x when combined with a second instruction from notify_telegram=True in the routine). Changes: - Removed "Notify via Telegram" sections entirely from 10 skills that have a corresponding routine using notify_telegram=True: fin-weekly-report, gog-email-triage, prod-dashboard, prod-trends, pulse-monthly, pulse-weekly, sage-strategy-digest, fin-monthly-close-kickoff, social-analytics-report, social-youtube-report - Rewrote Telegram instructions without inline reply() code in 4 skills that are called without notify_telegram (heartbeat or conditional): int-sync-meetings, int-github-review, int-linear-review (plain text), custom-getfy-sync, custom-omc-sync (plain text, local/gitignored) The corresponding routines (gitignored) were updated locally to add notify_telegram=True where the section was removed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…finitive fix) Root cause: prompt instructions cannot reliably prevent Claude from calling reply() multiple times. No matter how explicit the instruction, the agent may call the tool on reading it, on output, and again at the end. Architectural change: Claude never calls Telegram anymore. 1. runner.py run_skill(): Claude is asked to output a TELEGRAM_MSG: line in stdout. After the skill returns, Python reads that line and calls send_telegram() exactly once via HTTP bot API. Guaranteed 1 message. 2. int-sync-meetings, int-github-review, int-linear-review: replaced "use the Telegram tool" with "write TELEGRAM_MSG: as the last line". 3. sync_meetings.py (local): added notify_telegram=True so the runner handles the notification. This makes duplicate Telegram notifications structurally impossible regardless of how many times Claude mentions or tries to call reply().
…te repo info, and improve SSE events
There was a problem hiding this comment.
Sorry @dbadaniel, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A criação do brain-repo estava funcionando, mas reconectar não estava. Haviam algumas questões relacionadas ao token e também ao monitoramento do restore.
PS. lembrando que na construção da imagem para o docker precisa colocar o git